aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/groups/[groupId]/layout.tsx
diff options
context:
space:
mode:
authorSebastien Castiel <sebastien@castiel.me>2023-12-06 17:47:41 -0500
committerSebastien Castiel <sebastien@castiel.me>2023-12-06 18:57:35 -0500
commite747ec3ea02dd01e9ffa9e398e24e6939a5b738c (patch)
tree7f66d981effe2f51192ab7562d6c36ecdce459c1 /src/app/groups/[groupId]/layout.tsx
parent12b1cdb52a9d2723c319083b45a4e9a21896b3b4 (diff)
Tabs
Diffstat (limited to 'src/app/groups/[groupId]/layout.tsx')
-rw-r--r--src/app/groups/[groupId]/layout.tsx20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/app/groups/[groupId]/layout.tsx b/src/app/groups/[groupId]/layout.tsx
index 5c835f5..5b99dd2 100644
--- a/src/app/groups/[groupId]/layout.tsx
+++ b/src/app/groups/[groupId]/layout.tsx
@@ -1,6 +1,8 @@
+import { GroupTabs } from '@/app/groups/[groupId]/group-tabs'
+import { SaveGroupLocally } from '@/app/groups/[groupId]/save-recent-group'
import { Button } from '@/components/ui/button'
import { getGroup } from '@/lib/api'
-import { ChevronLeft, Edit } from 'lucide-react'
+import { ChevronLeft } from 'lucide-react'
import Link from 'next/link'
import { notFound } from 'next/navigation'
import { PropsWithChildren } from 'react'
@@ -24,19 +26,15 @@ export default async function GroupLayout({
</Button>
</div>
- <div className="flex justify-between items-baseline mb-4">
- <h1 className="font-bold text-2xl">
- <Link href={`/groups/${groupId}`}>{group.name}</Link>
- </h1>
+ <h1 className="font-bold text-2xl mb-4">
+ <Link href={`/groups/${groupId}`}>{group.name}</Link>
+ </h1>
- <Button variant="outline" asChild size="icon">
- <Link href={`/groups/${groupId}/edit`}>
- <Edit className="w-4 h-4" />
- </Link>
- </Button>
- </div>
+ <GroupTabs groupId={groupId} />
{children}
+
+ <SaveGroupLocally group={{ id: group.id, name: group.name }} />
</>
)
}